ga.view.streaming.nodes
Class AnchorNode<T extends IIndividual<T>>

java.lang.Object
  extended by com.jme3.scene.Spatial
      extended by com.jme3.scene.Node
          extended by ga.view.streaming.nodes.AnchorNode<T>
Type Parameters:
T - The generic type of the individuals.
All Implemented Interfaces:
com.jme3.asset.CloneableSmartAsset, com.jme3.collision.Collidable, com.jme3.export.Savable, java.lang.Cloneable

public class AnchorNode<T extends IIndividual<T>>
extends com.jme3.scene.Node

This provides an anchor nodes that will pull attached nodes through the scene.

Since:
12.08.2012
Author:
Stephan Dreyer

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme3.scene.Spatial
com.jme3.scene.Spatial.BatchHint, com.jme3.scene.Spatial.CullHint
 
Field Summary
private  PanelNode<T> attachedNode
           
private  com.jme3.bullet.control.RigidBodyControl control
           
private  com.jme3.bullet.PhysicsSpace physicsSpace
           
private  com.jme3.bullet.joints.Point2PointJoint sliderJoint
           
 
Fields inherited from class com.jme3.scene.Node
children
 
Fields inherited from class com.jme3.scene.Spatial
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_LIGHTLIST, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldTransform
 
Constructor Summary
AnchorNode(com.jme3.bullet.PhysicsSpace physicsSpace)
          Instantiates a new anchor node.
 
Method Summary
 void attachJoint(PanelNode<T> node)
          Attachs a joint to the given node.
 void detachJoint()
          Detaches the joint to the node.
 PanelNode<T> getAttachedNode()
          Gets the attached node.
 com.jme3.bullet.control.RigidBodyControl getControl()
          Gets the control.
protected  void setParent(com.jme3.scene.Node parent)
           
 
Methods inherited from class com.jme3.scene.Node
attachChild, attachChildAt, breadthFirstTraversal, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, read, setLightListRefresh, setLodLevel, setMaterial, setModelBound, setTransformRefresh, swapChildren, updateGeometricState, updateLogicalState, updateModelBound, updateWorldBound, write
 
Methods inherited from class com.jme3.scene.Spatial
addControl, addLight, breadthFirstTraversal, center, checkCulling, clone, forceRefresh, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, localToWorld, lookAt, matches, move, move, removeControl, removeControl, removeFromParent, removeLight, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setQueueBucket, setShadowMode, setUserData, toString, updateWorldLightList, updateWorldTransforms, worldToLocal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

physicsSpace

private final com.jme3.bullet.PhysicsSpace physicsSpace

sliderJoint

private com.jme3.bullet.joints.Point2PointJoint sliderJoint

control

private final com.jme3.bullet.control.RigidBodyControl control

attachedNode

private PanelNode<T extends IIndividual<T>> attachedNode
Constructor Detail

AnchorNode

public AnchorNode(com.jme3.bullet.PhysicsSpace physicsSpace)
Instantiates a new anchor node.

Parameters:
physicsSpace - the physics space
Since:
12.08.2012
Method Detail

attachJoint

public void attachJoint(PanelNode<T> node)
Attachs a joint to the given node.

Parameters:
node - the node
Since:
12.08.2012

getControl

public com.jme3.bullet.control.RigidBodyControl getControl()
Gets the control.

Returns:
the control
Since:
12.08.2012

detachJoint

public void detachJoint()
Detaches the joint to the node.

Since:
12.08.2012

setParent

protected void setParent(com.jme3.scene.Node parent)
Overrides:
setParent in class com.jme3.scene.Spatial

getAttachedNode

public PanelNode<T> getAttachedNode()
Gets the attached node.

Returns:
the attached node
Since:
12.08.2012